<template>
  <div id="love_list" >
    <c-title :hide="false" text="业绩"></c-title>
    <div class="headed">
      <div class="user">
        <div class="avatar">
          <img :src="avatar_image" alt="" />
        </div>
        <div class="userInfo">
          <span class="name">{{ userinfo.nickname }}</span>
          <span class="id">ID:&nbsp;&nbsp;{{ userinfo.member_id }}</span>
        </div>
      </div>
      <div style="display: flex; flex-direction: column; margin-top: 1.2rem;">
        <router-link :to="fun.getUrl('paicherecord')">
        <div class="record" style="margin-bottom: 0.33rem;"><span>送车记录</span><img width="1.33rem" height="1.33rem"
            src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/signPage/record-icon.png"
            alt="" /></div>
      </router-link>
      </div>
      
    </div>
    <div><img src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/signPage/decoration1.png"
        class="decoration" alt="" /></div>
    <div class="sign-info">
      <div style="display: flex; justify-content: space-between; margin-left: 1rem;">

        <div class="title">本人业绩：{{ bryj }}</div>
        
      </div>
      
      <div style="display: flex; justify-content: space-between;">
        <div
          style=" width: 1.5rem; height: 1.5rem; background: var(--themeBaseColor); border-radius: 100%; position: relative; right: 1.5rem;">
        </div>
        <div
          style=" width: 1.5rem; height: 1.5rem; background: var(--themeBaseColor); border-radius: 100%; position: relative; left: 1.5rem;">
        </div>
      </div>
      <div class="statistics">
        <div>
          <span style="font-size: 1rem;">{{ yj1 }}</span>
          <div>一区业绩</div>
        </div>
        <div style="width: 0.1rem; height: 3.5rem; background-color: #e7e7e7;"></div>
        <div>
          <span  style="font-size: 1rem;">{{ yj2 }}</span>
          <div>二区业绩</div>
        </div>
      </div>
      
      <div style="display: flex; justify-content: space-around;" v-if="!sign_status">
        <div
          style="width: 0.5rem; height: 2rem; background: #fde6c5; position: relative; right: 3rem; border-radius: 0.83rem;">
        </div>
        <div
          style="width: 0.5rem; height: 2rem; background: #fde6c5; position: relative; left: 3rem; border-radius: 0.83rem;">
        </div>
      </div>
      <div style="display: flex; justify-content: space-around;" v-else>
        <div
          style="width: 0.5rem; height: 2rem; background: #fde6c5; position: relative; right: 3rem; border-radius: 0.83rem;">
        </div>
        <div
          style="width: 0.5rem; height: 2rem; background: #fde6c5; position: relative; left: 3rem; border-radius: 0.83rem;">
        </div>
      </div>
    </div>

    <!-- <van-tabs v-model="selected" @click="switchItem">
        <van-tab id="0" title="业绩信息"></van-tab>
        <van-tab id="1" title="送车列表"></van-tab>
      </van-tabs> -->
    <div style="margin: 0 auto; width: 21.5625rem; border-radius: 0.71rem; overflow: hidden;">
      <div style="height: 12.125rem;background-color: #fff;" v-if="allData.length == 0">
      
      </div>
      <div class="coupon_card">
        <div class="tbs" v-for="(item, index) in allData" :key="index">
          <!-- <div class="left titles">
            本人业绩: {{ item.xj_person_total_yj }}

          </div> -->
          <div class="left titles">产生业绩: {{ item.change_yj }}</div>
          <div style="display: flex; justify-content: space-between;">
            <div style="color: #333;">产生区域: {{item.area == 1 ? '一' : '二'}}区</div>
            <div style="color: #333;">新业绩: {{ item.new_yj }}</div>
          </div>
          
          <div class="left">{{ item.create_date }}</div>

        </div>
      </div>
    </div>

  </div>
</template>
<script>
import paiche_controller from './paiche_controller';

export default paiche_controller;
</script>

<style lang="scss" rel="stylesheet/scss" scoped>
#love_list .mint-cell-value {
  width: 100% !important;
}

#love_list {
  background-color: var(--themeBaseColor);
  padding: 0;
  margin: 0;
  padding-bottom: 1rem;
  .headed {
    display: flex;
    justify-content: space-between;

    .user {
      margin-top: 1.33rem;
      width: 9.86rem;
      height: 3.71rem;
      background: linear-gradient(to bottom, #fde6c5, #fff);
      border-radius: 0 5.55rem 5.55rem 0;
      display: flex;
      justify-content: center;
      align-items: center;

      .avatar img {
        max-width: 2.43rem;
        max-height: 2.43rem;
        margin-right: 0.5rem;
        border-radius: 50%;
      }

      .userInfo .name {
        display: block;
        font-weight: bold;
        text-align: left;
        color: #333;
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 5rem;
      }

      .userInfo .id {
        display: block;
        font-weight: 400;
        text-align: left;
        color: #333;
        font-size: 0.7rem;
      }
    }

    .record {
      width: 6.67rem;
      height: 2.08rem;
      padding: 0.29rem 0.57rem;
      border: 0.01rem solid #fafafa;
      margin-right: 0.75rem;
      // margin-top: 2.5rem;
      border-radius: 1.67rem;
      color: #fff;
      text-align: center;
      line-height: 2rem;
      font-size: 1rem;
      display: flex;
      justify-content: center;
      align-items: center;

      img {
        width: 1.14rem;
        height: 1.14rem;
      }
    }
  }

  .gift-list {
    display: flex;
    justify-content: space-around;
    position: relative;
    top: 2rem;
    color: #fff;
    z-index: 10;

    :nth-child(1) {
      animation: bounce-down 1.6s linear infinite;
    }

    :nth-child(2) {
      animation: bounce-down 1.5s linear infinite;
    }

    :nth-child(3) {
      animation: bounce-down 1.7s linear infinite;
    }

    :nth-child(4) {
      animation: bounce-down 1.8s linear infinite;
    }

    .span-top {
      position: relative;
      bottom: 1.5rem;
      font-size: 0.5rem;
    }

    .span-bottom {
      display: block;
      position: absolute;
      top: 2.6rem;
      left: 1.2rem;
      font-size: 0.8rem;
      color: #333;
      font-weight: bold;
    }
  }

  .sign-info {
    width: 21.5625rem;
    margin-right: auto;
    margin-bottom: 0.5rem;
    margin-left: auto;
    // height: 15.3rem;
    height: 9.8rem;
    background-color: #fff;
    border-radius: 0.71rem;
    padding: 1rem;
    position: relative;

    .title {
      text-align: left;
      // font-weight: bold;
      color: #333;
      font-size: 1rem;
    }

    .directions {
      position: absolute;
      right: 0;
      width: 5rem;
      height: 1.5rem;
      background-color: #000;
      opacity: 0.2;
      border-radius: 1.875rem 0 0 1.875rem;
      color: #fff;
      text-align: center;
      line-height: 1.5rem;
    }

    .date {
      text-align: left;
      color: #333;
      margin-left: 1rem;
    }

    .statistics {
      margin-top: 1.5rem;
      display: flex;
      justify-content: space-around;
      font-size: 0.875rem;
      color: #333;

      span {
        // font-size: 1.125rem;
        // font-weight: bold;
        color: #333;
      }
    }

    .complete-btn {
      width: 12rem;
      height: 3rem;
      background-color: #f84949;
      margin: 1.5rem auto 0 auto;
      border-radius: 2rem;
      color: #fff;
      font-size: 1.25rem;
      text-align: center;
      line-height: 3rem;
      opacity: 0.5;
    }

    .btn {
      width: 12rem;
      height: 3rem;
      background-color: #f84949;
      margin: 1.5rem auto 0 auto;
      border-radius: 2rem;
      color: #fff;
      font-size: 1.25rem;
      text-align: center;
      line-height: 3rem;
    }
  }

  .decoration {
    width: 3rem;
    height: 3rem;
    position: relative;
    left: 8rem;
    top: 1.5rem;
  }

  @keyframes bounce-down {
    25% {
      transform: translateY(-2px);
    }

    50%,
    100% {
      transform: translateY(2);
    }

    75% {
      transform: translateY(6px);
    }
  }
}

.top {
  padding: 1rem 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;

  .item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    .item-point {
      font-size: 1rem;
      font-weight: bold;
    }

    .item-text {
      font-size: 0.825rem;
      font-weight: 500;
    }
  }
}


.tbs {
  // display: flex;
  // align-items: center;
  background: #fff;
  flex-flow: row wrap;
  border-bottom: #ebebeb 0.0625rem solid;
  padding: 0.625rem 0.75rem;
  box-sizing: border-box;
  // color: #333;
  color: #8c8c8c;
  font-size: 14px;

  .list-mark {
    color: #333;
    font-size: 0.75rem;
    text-align: left;
  }

  .left {
    line-height: 1.5rem;
    flex: 50%;
    text-align: left;
    font-size: 12px;
  }

  .right {
    line-height: 1.5rem;
    font-size: 14px;
    flex: 50%;
    text-align: right;
  }

  .titles {
    font-size: 14px;
    color: #333;
    line-height: 1.5rem;
    display: flex;
    width: 100%;
    overflow: hidden;

    .source-name {
      margin-right: 0.5rem;
    }

    .remark {
      flex: 1;
      font-size: 0.75rem;
      color: #333;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }

  .reds {
    color: #f15353;
    line-height: 1.5rem;
    font-size: 12px;

    small {
      font-size: 14px;
    }
  }
}

.right {
  line-height: 1.5rem;
  flex: 30%;
  text-align: right;
}

.titles {
  font-size: 14px;
  color: #333;
  line-height: 1.5rem;
}

.reds {
  color: #f15353;
  line-height: 1.5rem;
  font-size: 14px;

  small {
    font-size: 14px;
  }
}


p {
  margin: 0;
  padding: 0;
  vertical-align: baseline;
}



.coupon_card,
.coupon_info {
  // margin: 0.625rem 0 0;
  width: 100%;

  .coupon_voucher {
    margin-bottom: 0.625rem;
    position: relative;
    -webkit-transition: -webkit-transform 0.5s ease-in-out;
    transition: -webkit-transform 0.5s ease-in-out;
    transition: transform 0.5s ease-in-out;
    transition: transform 0.5s ease-in-out, -webkit-transform 0.5s ease-in-out;
    padding-left: 0;

    .coupon_voucher_main {
      position: relative;
      padding-left: 6.375rem;
      height: 6.875rem;
      width: 100%;
      box-sizing: border-box;

      .coupon_voucher_left {
        position: absolute;
        top: 0;
        left: 0;
        width: 6.375rem;
        height: 100%;
        color: #fff;
        border-radius: 0.25rem 0 0 0.25rem;
        text-align: center;
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        flex-direction: column;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;

        .coupon_voucher_amount {
          position: relative;
          font-size: 32px;
          line-height: 2rem;
        }

        .coupon_voucher_amount::before {
          content: "\00A5";
          font-size: 16px;
          display: inline-block;
          vertical-align: text-top;
          margin-right: 0.1875rem;
        }

        .coupon_voucher_limit {
          font-size: 12px;
        }
      }

      .coupon_voucher_hr {
        position: absolute;
        top: 0;
        left: 6.0625rem;
        width: 0.375rem;
        overflow: hidden;
        height: 100%;
      }

      .coupon_voucher_hr::after {
        box-sizing: border-box;
        position: absolute;
        top: -0.1875rem;
        right: -0.1875rem;
        bottom: 0;
        content: "• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •";
        line-height: 0.625rem;
        width: 0.4375rem;
        color: #f8fbfb;
        font-size: 18px;
        overflow: hidden;
        z-index: 1;
      }

      .coupon_voucher_right {
        padding: 0.9375rem 0.9375rem 0.9375rem 0.625rem;
        height: 100%;
        border-radius: 0 0.25rem 0.25rem 0;
        background-color: #f8fbfb;
        color: #666;
        width: 100%;
        box-sizing: border-box;
        //              float: right;
        position: relative;

        .coupon_voucher_range {
          overflow: hidden;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
          font-size: 12px;
          text-align: left;
        }

        .coupon_voucher_btn.bg_1 {
          color: #3985ff;
          z-index: 111;
          background-color: #3985ff;
          border: 0.0625rem solid #3985ff;
          background: none;
          border-color: #3985ff;
          border-radius: 0.625rem;
          font-size: 12px;
        }

        .coupon_voucher_btn.bg_1::after {
          border-color: #3985ff;
        }

        .coupon_voucher_more_arr {
          display: inline-block;
          vertical-align: middle;
          margin-top: -0.125rem;
          margin-left: 0.3125rem;
          width: 0.75rem;
          height: 0.75rem;

          /* background: url(…zqJV2ttTR8uaPvmc9AmL2S87lc2YzIy3/ieHyx4J7zexZON0gP9cnwmkcAAAAASUVORK5CYII=) 50% no-repeat; */
          background-size: 12px auto;
          -webkit-transition: -webkit-transform 0.5s ease-in-out;
          transition: -webkit-transform 0.5s ease-in-out;
          transition: transform 0.5s ease-in-out;
          transition: transform 0.5s ease-in-out, -webkit-transform 0.5s ease-in-out;
          border: 0.0625rem solid #333;
          border-radius: 0.75rem;
        }
      }
    }

    .coupon_voucher_btm {
      display: none;
      position: relative;
      box-sizing: border-box;
      padding: 0.5rem 0.625rem;
      background-color: #f2f2f7;
      border-radius: 0.1875rem;

      .coupon_voucher_explain {
        color: #333;
        font-size: 12px;
        text-align: left;
      }
    }

    .coupon_voucher_btm.hies {
      display: block;
    }
  }
}
</style>